home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 015a / tsbat30.zip / tsbat.nws < prev    next >
Text File  |  1991-12-07  |  25KB  |  432 lines

  1. University of Vaasa, Finland, MIPS 2030 workstation garbo.uwasa.fi
  2. has a large collection of PD and shareware PC programs available by
  3. anonymous ftp or mail server. The file /pc/ts/0news-ts contains news
  4. about the TS-programs in the /pc/ts directory (in reverse order).
  5. This text, which you now have, is an edited extract from the
  6. 0news-ts file, and the feedback fback028.arc file.
  7. ...................................................................
  8. Prof. Timo Salmi        
  9. Moderating at garbo.uwasa.fi anonymous ftp archives 128.214.87.1
  10. School of Business Studies, University of Vaasa, SF-65101, Finland
  11. Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun
  12. ...................................................................
  13.  
  14. Sat 7-Dec-91: I have updated my collection of useful batch files. It
  15. is now garbo.uwasa.fi:/pc/ts/tsbat30.zip.
  16.    Alan Clark (clark@odie.ee.wits.ac.za) suggested that the screen
  17. blanking batches could well do with a method to totally hide the
  18. cursor while blanked. I have looked into this and noticed that this
  19. can be easily achieved without extra programs by using ansi escape
  20. sequences. BLK.BAT shows how to do it. (You'll have to activate
  21. cursor hiding by editing three rems away).
  22.    Added LC.BAT line count for text files.
  23.    Added TEST33.BAT Test for MsDos 3.3 or later, batch demo
  24.  
  25. Sat 9-Nov-91: I have updated my collection of useful batch files to
  26. be garbo.uwasa.fi:/pc/ts/tsbat29.arc. It includes PUSHDIRE.BAT,
  27. SETPUSHD.EXE, and POPDIRE.BAT for pushing and poppoing the current
  28. directory (utilizing environment variables).  I have added a /q
  29. switch for quiet operation (no echoing of the environment variables)
  30. at a suggestion from Doug Tooley, djtooley@lotus.uwaterloo.ca.
  31.    I have added a TESTANSI.BAT batch (with accompanying ISANSI.EXE)
  32. which can be used to test whether any ansi-type screen driver is
  33. installed and thus available.
  34.    There are also some minor adjustments in a couple of the old
  35. batches.
  36.    Get this package even if you do not need the individual batches.
  37. There is much to learn from them about MsDos and batch usages. Many
  38. Frequenly Asked Questions (FAQs) are implicitly answered by looking
  39. at these files.
  40.  
  41. Sun 20-Oct-91: I have a collection of useful batch files which I
  42. have updated to be garbo.uwasa.fi:/pc/ts/tsbat28.arc.
  43.   I have added a LEVEL.BAT testbench batch for testing the error
  44. level returned by programs.
  45.   I have updated the ASK.EXE batch file enhancer. It now has the
  46. option to of returning with a timeout errorlevel. The usage of
  47. this enhancer is:
  48.  ASK [Prompt] [/b] [/d] [/l] [/t##] [/u]
  49.                 !    !    !    !      +- convert to Upper case
  50.                 !    !    !    +- Time-out parameter (0 = forever)
  51.                 !    !    +- convert to Lower case
  52.                 !    +- Direct read (no <-+ needed)
  53.                 +- Batch mode (needed only if no prompt)
  54.    I have added an ASKENV.EXE batch file enhancer to the collection.
  55. It is similar to ASK.EXE, but instead of returning an errorlevel
  56. value, it sets the (parent's) environment variable ASKENV value
  57. equal to the user's response.
  58.  
  59. Mon 9-Sep-91: I have updated my collection of useful batch files. It
  60. is now /pc/ts/tsbat27.arc.
  61.    Four of the batches in the package has been updated. Of these
  62. DAILY.BAT for running a program no more than one a day (eg from
  63. autoexec.bat) utilized ENTER.TXT to simulate pressing the enter key.
  64. This is no longer necessary but has been rewritten (with a trick
  65. with the echo command) in a way that no longer needs this separate
  66. file. My thanks to Ran Cheremsh CHERMESH%BGUVM.BITNET for reporting
  67. the problem.
  68.    SCANZ for scanning .ZIP files for viruses had a bug in the
  69. routine for scanning embedded .ZIPs.
  70.  
  71. Tue 9-Jul-91: I have updated my collection of useful batch files. It
  72. is now /pc/ts/tsbat26.arc.
  73.    Note that even if you don't perhaps need the same batches as I
  74. do, these batches may teach you many useful batch programming
  75. tricks which I have accumulated during my PC years.
  76.    Made a number of minor stylistic corrections.
  77.    Since someone cracked the pkzip 1.10 authenticity (-av) code some
  78. BBSes have been putting in their own ads as the authenticity labels.
  79. A new batch rezip.bat removes these labels, which may give the users
  80. a false sense of security.
  81.    Added a simple batch ruler.bat which shows the screen columns
  82. using ansi codes to avoid excessive scrolling.
  83.    I have my ramdisk on currently on drive R on my PCs which I use
  84. at home and at office.  For whatever it is worth I have updated the
  85. batches to reflect this change. Some of the batches require anyway
  86. that you edit the paths in them to reflect yours, so no added
  87. problem arise because of this.  And, if you have your own ramdisk,
  88. say, on d:, you can put the statement subst r: d:\ eg in your
  89. autoexec.bat file to avoid the need of editing just because we may
  90. happen to have ramdisks on different drives. (To be accurate there
  91. is no absolute need of your d: physically being a ramdisk. But it
  92. makes things a bit faster.)
  93.  
  94. Sun 12-May-91: I have updated my collection of useful batch files to
  95. be /pc/ts/tsbat25.arc.
  96.    One of the constant worries of downloaders of archived packages
  97. is the threat of viruses. (Games from shady BBSes are particularly
  98. susceptibe, but even commercial products have been known to be
  99. infected). Fortunately there are good virus checkers like McAfee's
  100. /pc/virus/scanv77.zip and Fridrik Skulason's /pc/virus/fp-115a.zip
  101. available to check for infections. There are, however, two dilemmas
  102. in checking archived packages on a routine basis. (Since the format
  103. garbo.uwasa.fi archives mostly uses is .zip let's speak of zipped
  104. files). The first problem is that there are so many executable
  105. compressors in use currently (such as lzexe, pklite, diet, tinyprog,
  106. etc). This means that unless the virus checking programs can observe
  107. all these variations, a virus can be hiding in an execompressed
  108. form. Therefore it is advisable to expand the executables for the
  109. check. A second problem is that .zip files occasionally contain
  110. embedded .zip files (eg PC-Magazine's collections often do). These
  111. embedded .zip files must be unzipped for a closer examination.
  112.    The earlier versions of the tsbat collection included a batch
  113. called scanzip.bat. I have completely rewritten this batch to take
  114. care of the two eventualities discussed above. I have renamed the
  115. rewritten batch scanz.bat. Note that before using this new batch,
  116. you have to go through scanz.bat and edit all the directory path
  117. references to correspond to your own configuration. This is, of
  118. course, an inconvenience, but it is the best way of guaranteeing
  119. that a batch complicated as this stays reasonably efficient.
  120.  
  121. Wed 13-Mar-91: I have written a menu based ansi.sys driven advanced
  122. batch for sending command codes to the printer to make printer
  123. initialization and setting easy. It is called setprn.bat. It is for
  124. Diconix Inkjet Parallel Printer Model 150, which is an Espon
  125. compatible printer. Thus the batch is suitable for various different
  126. printer makes, and easily configurable. I have added this batch to
  127. my collection of (hopefully) useful and instructive batch files
  128. /pc/ts/tsbat24.arc best available by anonymous ftp from
  129. garbo.uwasa.fi archives. There is a program-based alternative to
  130. setprn.bat, that is setdico.exe which can be found in
  131. /pc/ts/tsprn##.arc. The difference is that in setprn.bat you are
  132. able to configure the printer codes if you wish.
  133.  
  134. Sat 29-Dec-90: I have programmed a fair number of MsDos batch files
  135. to make up a batch file collection of hopefully both useful and
  136. instructive batches. I have updated the collection to be version
  137. /pc/ts/tsbat23.arc by adding some new batches.
  138. ...
  139.    FU.BAT is a poor man's function evaluator utilizing gwbasic that
  140. (usually) belongs automatically to the MsDos delivery. The basic
  141. idea (pardon the pun) of combining batch and gwbasic programming is
  142. not really mine. I got it from the PC-Magazine. The code of this
  143. batch, however, is entirely due to yours truly.
  144. ...
  145.    ASK.EXE is a common batch file enhancer returning as errorlevel
  146. the ascii value of the first character of the user's response.
  147. An example of a simple batch utilizing ASK:
  148.     echo off
  149.     ASK Yes or no? /d /u
  150.     if errorlevel==89 if not errorlevel==90 echo It was a yes
  151.     if errorlevel==78 if not errorlevel==79 echo It was a no
  152.     echo on
  153. My ask has switches for lower case (/l) and upper case (/u)
  154. conversions, and (/d) "direct" reads without needing to press the
  155. enter key. The ask prompt may include escape sequences for ansi
  156. graphics. This is a feature not always available in other ask
  157. programs.
  158.    Ok, there are countless ask batch enhancers already around, so
  159. why yet another. Simply so that then tsbat23.arc has it, and you
  160. don't have to get one separately. Furthermore, this ask is both
  161. simple and general enough to be easy to use while being still
  162. flexible.
  163.    BTW, ask is the one command which the original MsDos batch
  164. programming most conspicuously lacks and needs. So many other
  165. seemingly lacking features are embedded in MsDos, and you just have
  166. to ferret them out. That's partly what tsbat23.arc collection is
  167. about.
  168. ...
  169.    SAFEDEL.BAT is a generalized batch for deleting files. It asks
  170. for confirmation for each file to be deleted. The usage is
  171.         SAFEDEL [FileName1] [FileNam2] ...
  172. and wildcards are allowed.
  173. ...
  174.    MENU.BAT show show to build menus for easy program selection by
  175. the user. This batch utilizes ask.exe, and is livened up by ansi
  176. graphics.
  177. ...
  178.    UNPACK.BAT has been updated. It extracts, tests, and views packed
  179. files (archives) irrespective of the packing method. The update
  180. handles also .arj files (the new arrival sent packing on the scene).
  181.  
  182. Mon 22-Oct-90: I have updated my batch file collection to be
  183. /pc/ts/tsbat22.arc. PC-Magazine Vol 9 Num 14 published a batch to
  184. com file compiler bat2exec.com by Douglas Boling which is in the
  185. /pc/pd2/bat2ex13.zip package at chyde.uwasa.fi archives. As would be
  186. expected a batch compiler is more stringent in its requirements than
  187. MsDos. Consequently I have gone through the batches in my collection
  188. and seen to it that they are compilable. Note that in doing this I
  189. have not altered the tasks of the batch files, nor have I included
  190. the resultant compiled .com files. Where needed, I have just
  191. adjusted the batches to conform with bat2exec.com compiler
  192. requirements.
  193.    Among others there is an addpath.bat batch for adding directories
  194. to the path without needing to rewrite the whole path as the
  195. ordinary path command would require. In a similar manner there is
  196. delpath.bat to omit a single directory from the path. Delpath.bat
  197. needs an auxiliary batch file called setvar.bat, which must be
  198. available to the delpath.bat. Delpath now checks whether the
  199. auxiliary setvar.bat file is available in the current directory or
  200. at path before running the rest of delpath.bat.
  201.    When a batch contains a call to a program, the program must
  202. either be in the current directory, at path, or the call must
  203. contain the path to the program. The last method has the
  204. disadvantage of requiring adaptation to user's own structure.
  205. Therefore the most general method is having the necessary program(s)
  206. at path. If the program is not available, a normal batch ends in a
  207. "Bad command or file name" error message. This gives very little
  208. information of the cause of the problem. Therefore I have added
  209. routines in the batches to precheck that the required program(s) are
  210. indeed at path, and if not, issue a proper error message telling
  211. what exactly is awry. (The batch trick here is testing whether a
  212. given file is at path.)
  213.    An additional note. Batches like delpath.bat cannot obviously be
  214. compiled successfully with bat2exec because of its need of an
  215. auxiliary batch. Another batch that works as a normal batch file,
  216. but won't work when compiled is color.bat. Color.bat sets the screen
  217. color attributes using ansi code. Bat2exec.exe compiler has similar
  218. problems with some other batches as well, but this does not affect
  219. the user of these batch files in any way.
  220.    I have added blk.bat as an alternative simple screen saver to
  221. complement blank.bat. Blk.bat stores the screen before blanking and
  222. pops it when you exit the saver.
  223.  
  224. Fri 13-Jul-90:  One of the operators at our computer centre asked me
  225. today whether I know a replacement utility for MsDos diskcopy to
  226. copy a 1.2Mb floppy to another without having to change the disks
  227. more than once. This is because MsDos diskcopy.com requires a total
  228. of five disk changes in the process, and besides this being tedious
  229. one easily gets things mixed up. If you look at things this way,
  230. scopy.bat in /pc/ts/tsbat21.arc does exactly what he was asking for,
  231. in a single step. But on the balance, you must have the target disk
  232. formatted before you begin the process (diskcopy does that for you,
  233. if necessary). This batch method works easily, though, only if the
  234. diskette to be copied has no subdirectories.
  235.  
  236. Sun 24-Jun-90: I have updated my batch file collection to be
  237. (/pc/ts)/tsbat21.arc. This time I have added my rendition of setting
  238. the screen text color and background. The color.bat batch uses ansi
  239. color codes. (Thus you must have loaded ansi.sys driver, or its
  240. enhanced equivalent (such as nansi.sys or zansi.sys). In other words
  241. your config.sys must have a line like device=\sys\zansi.sys in it).
  242.    Version tsbat20 introduced a scanzip.bat batch as a shell to scan
  243. .zip packages for viruses utilizing McAfee's scan.exe virus checker.
  244. In addition to unzipping the .zip files into a temporary directory
  245. the batch uncompressed lzexec .exe files, if any, using Alan
  246. Posner's (/pc/pd2) isl12.zip and Mitugu Kuriziono's
  247. (/pc/pd2/)unlzexe5.zip. With the introduction of version
  248. (/pc/virus/)scanv63.zip uncompression lzexed executables is no
  249. longer necessary, and I have adjusted the batch accordingly. I have,
  250. however, done this by just commenting away parts of the batch, so
  251. that you can still apply it if you have earlier than scan.exe
  252. version 63. I have also added checking overlay files in addition to
  253. .exe and .com files.
  254.    Please note that your email comments, feedback and suggestions on
  255. the ts-programs would be welcome. And if you want to look at other
  256. users' feedback, you can see it by getting /pc/pd2/post##.txt (## =
  257. 01, 02, and so on).
  258.  
  259. Thu 7-Jun-90: Lzexed files pose a problem for the present virus
  260. scanners. While waiting to see the announced scanv63 to appear with
  261. abilities to scan lzexe-compressed files, I wrote a batch to handle
  262. scanning .zip packages. This batch checks both ordinary and lzexed
  263. files within a .zip package. The following shareware and PD programs
  264. are needed: pkunzip.exe, scan.exe, islzexe.exe, unlzexe.exe, The
  265. packages containing these programs can be found from good BBSes and
  266. eg from chyde.uwasa.fi by anonymous ftp. The new batch scanzip.bat
  267. is included in the updated /pc/ts/tsbat20.arc batch file collection.
  268.  
  269. Fri 1-Jun-90: Released version /pc/ts/tsbat19.arc of my batch files
  270. collection. It includes two new batches. There is a poor man's
  271. screen save blank.bat, and there is an extension of the MsDos type
  272. command show.bat, which allows the usage of wildcards and multiple
  273. file names. You'll decide yourself if there is any usage for a
  274. wildcard type. Myself, I do not see any outright, but the batch
  275. itself is a very good exercise in batch programming. If you are new
  276. to this aspect of MsDos, I think you will learn many useful tricks
  277. from batches like this. - Where possible, I have tried to write the
  278. batches in a way that they need a minimum about of auxiliary files
  279. or such auxiliary programs, which are not part of MsDos (internal or
  280. external) commands. - I have rewritten lastboot.bat (recording the
  281. previous boot time of your PC) and logrun.bat (recording program
  282. usage) so that they no longer need the auxiliary files enter.txt and
  283. star.txt, which have been deleted from the new version. - There are
  284. some stylistic changes in scopy.bat.
  285.  
  286. Sat 17-Mar-90: Released a new version /pc/ts/tsbat18.arc of my batch
  287. files collection. - It seems that this batch collection has become
  288. perhaps the most popular of my packages judging from the recent
  289. download figures and the comments from users. (A note written later:
  290. The most downloaded package of mine is the Frequently Asked
  291. Questions /pc/ts/tsfaq##.arc, by a broad margin). - Corrected a
  292. small bug in c.bat that prevented going back to the root directory.
  293. - Built a simple batch lastboot.bat for displaying the date and time
  294. of the previous booting. - Also built a new batch virus.bat. This
  295. batch makes a directory both prior and after running the suspect
  296. program, and gives a warning if the directories differ, and prepares
  297. a list of the differences. The batch can be also used by a
  298. knowledgeable user for the more benevolent similar purpose of
  299. checking what files a certain programs changes.
  300.    *Flame off* One lesson to be learned from batch programming is
  301. that properly used MsDos can be quite flexible. I think it is here
  302. to stay for a long time yet Unix and OS/2 notwithstanding. And this
  303. does not mean castigating Unix nor OS/2. (Any discussion of this
  304. aspect to the proper newsgroups, if you please.) *Flame on* :-)
  305.  
  306. Sun 11-Mar-90: Released a new version /pc/ts/tsbat17.arc of my batch
  307. files collection. This update introduces a batch shell unpack.bat
  308. for extracting, testing, and viewing packed files irrespective of
  309. the packing method.
  310.  
  311. Sun 04-Mar-90: My batch file collection is now version (/pc/ts/)
  312. tsbat16.arc. - Addpath.bat appending new directories to the path now
  313. checks whether the directory exists, and whether the directory
  314. already is at path, thus preventing mistakes by the user. I use this
  315. batch myself a lot, and since I often make typing errors, I wanted
  316. the batch to do the validity checking for me. - Arc2zip.bat
  317. converting an .arc file to a .zip file, with comment, has added
  318. safeguards against errors and corrupted archives. - Deldir.bat for
  319. deleting the files from a directory and then removing the directory,
  320. has been rewritten. - There are also new batches in the collection.
  321. - There is a harddisk version of the packing methods converter
  322. called zoo2arch.bat. It is a .zoo to .zip converter eg for those who
  323. prefer tighter .zip files over the binary posting's current .zoo
  324. packing method. - If you have been annoyed by the fact that MsDos
  325. cannot take more than one command per command line, m.bat is the
  326. batch for you. It is a batch that facilitates giving multiple MsDos
  327. commands. Another new batch is d.bat. It gives the directory with
  328. sort and generalized name matching. - Also managed to resist the
  329. temptation to rename the documentation to the obvious bat.man.
  330.  
  331. Thu 25-Jan-90: I have updated my batch file collection to be version
  332. (/pc/ts/)tsbat15.arc.  There is just one addition, daily.bat. It is
  333. intended to run a program from the autoexec.bat file only once in a
  334. day.  There are programs in circulation, which achieve the same
  335. thing as daily.bat.  The trick in daily.bat is that it is a true
  336. batch file without the need of any external user-made programs.
  337. This not a very difficult to do, but tricky enough to be
  338. interesting and educational.
  339.  
  340. Tue 16-Jan-90: I have still been thinking about batch files and
  341. interesting tricks to do with them, and I therefore publish a new
  342. upgrade of my botch :-) collection in a rapid succession after the
  343. last update. The upgrade is (/pc/ts/)tsbat14.arc, and it will be
  344. available by anonymous ftp at least from chyde.uwasa.fi, Simtel20,
  345. and by BBS download or file request from Micro Maniacs Opus 2:515/1
  346. telephone 358-0-425966. Two new utilities are included. The first is
  347. delpath.bat, which removes a directory from the path variable. This
  348. was a really tricky one, and my solution (contrary to the other
  349. batches in the collection) requires MsDos version 3.30 because it
  350. uses the call command. I have since seen another solution in the
  351. PC-Magazine (Vol 8 No 21) but mine uses a somewhat different
  352. technique, and should be clearer because even I can understand how
  353. mine works :-). The second new batch is deldir.bat for deleting the
  354. files from a directory and then removing the directory. This is
  355. really trivial, but I needed it myself. I have tried to include
  356. reasonable number of safeguards within this batch.
  357.  
  358. Sun 14-Jan-90: I have updated my batch file collection to be version
  359. (/pc/ts/)tsbat13.arc.
  360.    There is a new batch arc2zip.bat for converting an .arc file to a
  361. corresponding .zip file. The batch automatically adds your zip-file
  362. comment to the converted .zip. Also, the date of the zip file is
  363. automatically set to the date of the latest file within the .zip,
  364. not the date of the conversion.
  365.    Another new batch is zipdate. It demonstrates how to datestamp
  366. .zip packages.
  367.    The new version also includes a second addpath utility. It is
  368. apath-om.bat and is by Otto Makela. It is included in my batch file
  369. collection with Otto's explicit permission. Thanks Otto. This batch
  370. nicely demonstrates testing a condition (is a directory already in
  371. the path) in MsDos batch programming. I had an interesting time
  372. testing Otto's batch and discussing the dilemmas in the earlier
  373. versions after Otto posted the original version in the news in
  374. alt.msdos.programmer. I think that we both gained in the process. I
  375. would pleased to consider similar useful contributions from other
  376. users, as well. If you are interested, contact me by email.
  377.    Where.bat has been rewritten. It finds a file by using a search
  378. string on the file name. Contrary to the ordinary wildcarded MsDos
  379. DIR-type convention, where.bat matches the search string anywhere
  380. within the body of the file name. The updated where.bat has been
  381. made case-insensitive (applies upper case conversion on batch
  382. parameters).
  383.    Some of the other batches in the package have had their help
  384. texts extended.
  385.  
  386. Sat 18-Nov-89: There are several nice memory resident push/pop
  387. directory utilities around. As you know pushdir stores the name of
  388. the directory where you are. You can then change the directory (and
  389. the drive) as much as you like, and popdir takes you right back to
  390. the original directory. But memory resident programs tend to pile
  391. up, and I started thinking whether push/pop can be achieved using
  392. non-resident batch methods. PUSHDIRE.BAT and POPDIRE.BAT together
  393. with SETPUSHD.EXE do this by juggling the environment variables. I
  394. pushed these files in my batch file collection and updated it to be
  395. tsbat12.arc. You can pop them from there.
  396.  
  397. Tue 31-Oct-89: Released update /pc/ts/tsbat11.arc of my batch files
  398. collection. The new release introduces LOGRUN.BAT. It can be used
  399. for calling programs and logging the call in a usage log with
  400. time/date information. The batch utilizes MsDos time and date
  401. commands for making the usage log of the program calls. The bug
  402. caused by the non-standard switch /i in the file finder WHERE.BAT
  403. has been amended. A new batch LOCATE.BAT for locating a file (or
  404. files) on a disk has been added. Contrary to WHERE.BAT it is not
  405. case sensitive. The "change the directory" batch has been renamed
  406. C.BAT (was SD.BAT). I have also added more comments within some of
  407. the batches.
  408.   If you get an "Out of environment space" message in these, or any
  409. other batches, try increasing your environment space by using shell
  410. configuration in config.sys:
  411.      Example: shell=c:\bin\command.com c:\bin /e:1024 /p
  412.  
  413. Sun 29-Oct-89: I decided to introduce a batch file collection
  414. /pc/ts/tsbat10.arc.  The batches are quite straightforward, and do
  415. not need any special auxiliary programs, just the ordinary MsDos
  416. commands.  Some of the batches are from my other utility packages,
  417. some are new.  I do not claim a high degree of originality.  This is
  418. because the methods and tasks of batch programming keep repeating
  419. over and over again.  But I hope that you will find some of my
  420. tricks useful.
  421.   And if you feel that you have useful batches yourself, which you
  422. would like to distribute to your fellow users, I would be interested
  423. in considering any good ideas for development.  Due credit would
  424. naturally be given.  I would, however, reserve the right to choose,
  425. and to develop your batches to suit the future versions of this
  426. Public Domain collection.
  427.  
  428. Thu 26-Oct-89: I have a private mailing list for emailing these
  429. update news. Especially, if you have my programs downloadable at
  430. your site or your BBS you are welcome to ask for inclusion on this
  431. list by emailing to me at ts@chyde.uwasa.fi.
  432.